package cn.gson.boot.model.dao;

import cn.gson.boot.model.pojos.CFGMDingdan;
import cn.gson.boot.model.pojos.Dingdan;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import javax.transaction.Transactional;

public interface CFGMDingDanDao extends CrudRepository<CFGMDingdan,Integer> {

    //根据订单id来移除订单 （逻辑删除）
    @Transactional
    @Modifying(clearAutomatically = true)
    @Query(nativeQuery = true,value = "update dingdan set dd_ys=0 where dd_id=?1")
    public void yichuCFGMDingDan(Integer ddid);
}
